package progress.exa8;

import java.util.LinkedList;
import java.util.List;

/**
 * 这个类使用jdk中已有的泛型类LinkedList来验证泛型机制
 */
public class GenericWildcard1 {

    public static void main(String[] args) {
        List list = new LinkedList<>();
        list.add(new Object());
        list.add(new Integer(100));
        System.out.println(list.get(0));
        System.out.println(list.get(1));
    }

    /**
     *
     */
    public void wildcard() {
        List<Employee> list = new LinkedList<>();
        List<Manager> list1 = new LinkedList<>();
        //list1.addAll(list);
    }
}

